import java.util.Scanner;

public class Test {
    public static boolean isPower(int x) {
        int power = 1;
        while(power <= x){
            if(power == x) {
                return true;
            }
            power *= 2;
        }
        return false;
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println(isPower(sc.nextInt()));
    }
}
